package com.fudan.biz.etl.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.fudan.biz.etl.entity.EtlTask;
import com.fudan.biz.etl.service.EtlTaskService;
import com.fudan.framework.entity.TableJson;
import com.fudan.framework.web.controller.PathController;

@RequestMapping("/biz/etl/task")
@Controller
public class EtlTaskController implements PathController{

	@Autowired
	private EtlTaskService etlTaskService;
	public TableJson getList(HttpServletRequest request) {
		List<EtlTask> list = etlTaskService.pages(request);
		long countAll = etlTaskService.countAll();
		return TableJson.build(list, countAll);
	}

	@Override
	public String pathPrefix() {
		return "biz/etl";
	}
}
